﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Asteroids.Game.ViewModel
{
    public class NextLevelViewModel : INotifyPropertyChanged
    {
        public NextLevelViewModel()
        {
            Game.Instance.NextLevelEvent += NextLevel;
        }

        private static int _currentLevel = 0;
        public int Level
        {
            get { return _currentLevel; }
            set
            {
                _currentLevel = value;
                if (PropertyChanged != null)
                    PropertyChanged(this, new PropertyChangedEventArgs("Text"));
            }
        }

        public String Text
        {
            get { return "Level " + Level; }
        }

        public void NextLevel(int currentLevel)
        {
            Level = currentLevel;
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}
